<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
	<head>
		<base href="<%=basePath%>">
		<meta charset="UTF-8"/>
		<title>修改学生</title>
		<link type="text/css" rel="stylesheet" href="css/style.css"/>
		<style type="text/css">
			table{border:1px solid #0099FF; background:#FFFF99; width:480px;  border-radius:25px 25px 0px 0px; margin-top:30px}
		</style>
	</head>
	<body>
		<form name="form1" method="post" action="StudentUpdateServlet">
		  <table align="center" >
			<tr>
			  <td height="109" colspan="2">
			  	<h2 style=" text-align:center">修改学生信息</h2>
			  </td>
			</tr>
			<tr>
			  <td width="131"><div align="right" class="textStyle">学号：</div></td>
			  <td width="340"><label>
			  	${s.stuNum}
				<input type="hidden" name="num" class="inputStyle" required="required" value="${s.stuNum}">
			  </label></td>
			</tr>
			<tr>
			  <td width="131"><div align="right" class="textStyle">姓名：</div></td>
			  <td width="340"><label>
				<input type="text" name="name" class="inputStyle" value="${s.stuName}">
			  </label></td>
			</tr>
			<tr>
			  <td width="131"><div align="right" class="textStyle">性别：</div></td>
			  <td width="340"><label>
			  	<c:if test="${s.stuSex eq '男'}">
					<input type="radio" name="sex" value="男" checked>男
					<input type="radio" name="sex" value="女">女
			  	</c:if>
			  	<c:if test="${s.stuSex eq '女'}">
					<input type="radio" name="sex" value="男" >男
					<input type="radio" name="sex" value="女" checked>女
			  	</c:if>
			  	
			  </label></td>
			</tr>
			<tr>
			  <td width="131"><div align="right" class="textStyle">年龄：</div></td>
			  <td width="340"><label>
				<input type="number" min="12" max="30" name="age" class="inputStyle" value="${s.stuAge}" >
			  </label></td>
			</tr>
			<tr>
			  <td width="131"><div align="right" class="textStyle">手机：</div></td>
			  <td width="340"><label>
				<input type="text" name="tel" class="inputStyle" maxlength="11" value="${s.stuTel}">
			  </label></td>
			</tr>
			
			<tr>
			  <td width="131"><div align="right" class="textStyle">QQ：</div></td>
			  <td width="340"><label>
				<input type="text" name="qq" class="inputStyle" value="${s.stuQQ}">
			  </label></td>
			</tr>
			<tr>
			  <td width="131"><div align="right" class="textStyle">地址：</div></td>
			  <td width="340"><label>
				<input type="text" name="addr" class="inputStyle" value="${s.stuAddr}">
			  </label></td>
			</tr>
			<tr>
			  <td width="131"><div align="right" class="textStyle">班级：</div></td>
			  <td width="340"><label>
			  <input type="hidden" value="${s.cla.cid}" name="old_cid"/>
				<select name="class_id">
					<option value="${s.cla.cid}">${s.cla.cname}</option>
					<c:forEach items="${cs}" var="c">
						<c:if test="${s.cla.cid != c.cid}">
							<option value="${c.cid}">${c.cname}</option>
						</c:if>
					</c:forEach>
				</select>
			  </label></td>
			</tr>
			<tr>
			  <td width="131"><div align="right" class="textStyle">备注：</div></td>
			  <td width="340"><label>
				<textarea rows="4" name="remark" class="inputStyle" style="height:50px">${s.stuRemark}</textarea>
			  </label></td>
			</tr>
			
			<tr height="60px">
			  <td>&nbsp;</td>
			  <td><label>
				<input type="submit" name="Submit" value="提交修改" class="btnStyle">
			  </label></td>
			</tr>
		  </table>
		</form>
	
	</body>
</html>